﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Common
{
    public class Logs
    {
        #region  Execute
        /// <summary>
        /// 向本地，写入日志
        /// </summary>
        /// <param name="data"></param>
        public static void Execute(string data)
        {
            using (System.IO.StreamWriter sw = new System.IO.StreamWriter(System.Environment.CurrentDirectory + ("/Logs/") + DateTime.Now.ToString("yyyy-MM-dd") + ".log", true, System.Text.Encoding.UTF8))
            {
                sw.WriteLine(DateTime.Now.ToString() + "：");
                sw.WriteLine(data);
                sw.WriteLine("---------------------------------------------");
                sw.Close();
            }
        }
        #endregion
    }
}
